function CALC()
{

	var list = [
		'electricity', 'naturalgas', 'coal', 'lpg', 'propane', 'heatingoil', 'buses', 'rail', 'tram', 'tube', 'cars', 'bankacs'
	];

	var cnt = 0.0;
	for( var i=0; i<list.length; i++ )
	{
		var el = document.getElementById(list[i]);
		if( el.value < 0 || el.value == "" ) el.value = 0;
	}

	Electricity = (458)/1000;
	NaturalGas = 1268/1000;
	HeatingOil = 2530/1000;
	Coal = 87/1000;
	LPG = 375/1000;
	Propane = 1500/1000;

	Bus = 143/1000;
	Tube = 85/1000;
	Tram = 105/1000;
	Rail = 97/1000;

	Meat = 335/1000;
	InSeasonFood1 = 35/1000;
	InSeasonFood2 = 55/1000;

	LatestTechFasion = 37/1000;
	Recycle = 60/1000;
	AdventureCarbonIntensive = 2622/1000;

	Cars = 1000000/1000;

	BankAcs = 400/1000;

	cnt += document.getElementById(list[0]).value*Electricity;
	cnt += document.getElementById(list[1]).value*NaturalGas;
	cnt += document.getElementById(list[2]).value*HeatingOil;
	cnt += document.getElementById(list[3]).value*Coal;
	cnt += document.getElementById(list[4]).value*LPG;
	cnt += document.getElementById(list[5]).value*Propane;
	cnt += document.getElementById(list[6]).value*Bus;
	cnt += document.getElementById(list[7]).value*Rail;
	cnt += document.getElementById(list[8]).value*Tube;
	cnt += document.getElementById(list[9]).value*Tram;
	cnt += document.getElementById(list[10]).value*Cars;
	cnt += document.getElementById(list[11]).value*BankAcs;
//	cnt += document.getElementById(list[12]).value*;

	if( document.getElementById("InSeason").selectedIndex == 0 ) cnt += InSeasonFood1;
	if( document.getElementById("InSeason").selectedIndex == 1 ) cnt += InSeasonFood2;

	if( document.getElementById("meat").checked ) cnt += Meat;

	if( document.getElementById("recycle").checked ) cnt+= Recycle;

	if( document.getElementById("fashion").checked ) cnt += LatestTechFasion;


	//alert(cnt);
	PlantTrees = 714/100;
	document.getElementById("CO2Count").innerHTML = " <strong>" + cnt/1000 + "</strong> tonnes/yr. You should plant (<strong><em>" + parseInt(PlantTrees*(cnt/1000)) + "</em></strong>) trees to offset your carbon footprint." ;
	//document.getElementById("header").focus();
	document.getElementById("myform").innerHTML = "<p>Click <a href=\"./carbon.htm\">refresh</a> to calculate again.</p>";


}
